<%--
  Created by IntelliJ IDEA.
  User: WheelChen
  Date: 2017/4/9
  Time: 19:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="../../static/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/global.css">
</head>
<body>

<div id="content" >
    <div class="admin-main">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>个人信息</legend>
        </fieldset>

        <form class="layui-form" method="post" style="width: 400px">
            <div class="layui-form-item">
                <label class="layui-form-label">真实姓名</label>
                <div class="layui-input-block">
                    <input name="realname" v-model="user.realname" class="layui-input">
                </div>
            </div>
            <%--性别--%>
            <div v-cloak>
                <div v-show="show">
                    <div class="layui-form-item">
                        <label class="layui-form-label" >性别</label>
                        <div class="layui-input-block" >
                            <div v-if="user.sex == 1">
                            <label class="layui-form-label" style="color: #999" >男</label>
                            </div>
                            <div v-if="user.sex == 2">
                                <label class="layui-form-label" style="color: #999" >女</label>
                            </div>
                            <div v-else>
                                <label class="layui-form-label" style="color: #999" >-</label>
                            </div>
                        </div>
                    </div>
                </div>

                <div v-show="!show">
                    <div class="layui-form-item">
                        <label class="layui-form-label" >性别</label>
                        <div class="layui-input-block" >
                            <input lay-filter="sex" type="radio" name="sex" value="1"  title="男" v-model="user.sex" >
                            <input lay-filter="sex" type="radio" name="sex" value="2"  title="女" v-model="user.sex" >
                        </div>
                    </div>
                </div>

            </div>
            <%--./性别--%>

            <div class="layui-form-item" >
                <label class="layui-form-label" >手机号码</label>
                <div class="layui-input-block">
                    <input type="text" name="mobilephone" v-model="user.mobilephone" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item" >
                <label class="layui-form-label" >邮箱地址</label>
                <div class="layui-input-block">
                    <input type="email" name="email" v-model="user.email" class="layui-input ">
                </div>
            </div>

           <%-- <div class="layui-form-item">
                <label class="layui-form-label">所属企业</label>
                <div class="layui-input-block">
                    <input type="text" name="phone"  autocomplete="off" class="layui-input" disabled="disabled">
                </div>
            </div>--%>

            <div v-cloak>
                <div v-show="show">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="button"  lay-filter="edit" class="layui-btn" @click="update" value="修改" lay-submit>
                        </div>
                    </div>
                </div>
                <div v-show="!show">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="button" class="layui-btn" @click="save" value="保存">
                            <input type="button" class="layui-btn" @click="reload" value="返回">
                        </div>
                    </div>
                </div>
            </div>

        </form>


    </div>
</div>
<script type="text/javascript">
    var userid = ${sessionScope.currentUser.getId()};
</script>
<script src="../../static/common/axios.min.js"></script>
<script src="../../static/js/utils.js"></script>
<script src="../../static/common/layui/layui.js"></script>
<script src="../../static/common/vue.min.js"></script>
<script src="../../static/js/enterprise/personInfo.js"></script>
</body>
</html>